//服务器全部接口返回的数据类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean
}

//
export interface SkuData {
    id?: number,
    createTime: string,
    updateTime: string,
    spuId: string,
    price: number,
    skuName: string,
    skuDesc: string,
    weight: string,
    tmId: number | string,
    category3Id: number,
    skuDefaultImg: string,
    isSale: number,
}

export type Records = SkuData[]

export interface SkuResponseData extends ResponseData {
    data: {
        records: Records,
        "total": number,
        "size": number,
        "current": number,
        "orders": [],
        "optimizeCountSql": boolean,
        "hitCount": boolean,
        "countId": null,
        "maxLimit": null,
        "searchCount": boolean,
        "pages": number
    }
}

export interface img {
    id: number,
    createTime: string,
    updateTime: string,
    skuId: number,
    imgName: string,
    imgUrl: string,
    spuImgId: number,
    isDefault: string
}
export type skuImageList = img[]

export interface skuAttrValue {
    id: number,
    createTime: string,
    updateTime: string,
    attrId: number,
    valueId: number,
    skuId: number,
    attrName: string,
    valueName: string
}
export type skuAttrValueList = skuAttrValue[]

export interface skuSaleAttrValue {
    id: number,
    createTime: string,
    updateTime: string,
    skuId: number,
    spuId: number,
    saleAttrValueId: number,
    saleAttrId: number,
    saleAttrName: string,
    saleAttrValueName: string
}
export type skuSaleAttrValueList = skuSaleAttrValue[]

export interface skuInfo{
    id: number,
    createTime: string,
    updateTime: string,
    spuId: number,
    price: number,
    skuName: string,
    skuDesc: string,
    weight: string,
    tmId: number,
    category3Id: number,
    skuDefaultImg: string,
    isSale: number,
    skuImageList:null | skuImageList,
    skuAttrValueList:null | skuAttrValueList,
    skuSaleAttrValueList:null | skuSaleAttrValueList,
}
//获取SKU商品详情接口的ts类型
export interface SkuInfoData extends ResponseData{
    data:skuInfo
}
